package com.qingcloud.api.dcengine.service;

import com.qingcloud.api.dcengine.dto.TablePageDTO;
import com.qingcloud.api.dcengine.dto.multi.CommonMultiData;
import com.qingcloud.api.dcengine.model.multi.MultiDataListParam;
import com.qingcloud.api.dcengine.model.multi.MultiDataPageParam;
import com.qingcloud.api.dcengine.service.fallback.MultiDataApiFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 特殊类型聚合数据，目前只有按微站站点类型聚合的
 */
@FeignClient(name = "multi-data-api", url = "${data-url}",
        fallback = MultiDataApiFallback.class)
public interface MultiDataApi {

    /**
     * 小时数据通用列表接口
     */
    @PostMapping("/mdata/hour/list")
    List<CommonMultiData> hourList(@RequestBody MultiDataListParam listParam);

    /**
     * 小时数据通用分页查询接口
     */
    @PostMapping("/mdata/hour/page")
    TablePageDTO<CommonMultiData> hourPage(@RequestBody MultiDataPageParam pageParam);

    /**
     * 天数据通用列表接口
     */
    @PostMapping("/mdata/day/list")
    List<CommonMultiData> dayList(@RequestBody MultiDataListParam listParam);

    /**
     * 天数据通用分页查询接口
     */
    @PostMapping("/mdata/day/page")
    TablePageDTO<CommonMultiData> dayPage(@RequestBody MultiDataPageParam pageParam);
}
